//
//  FDJieXi.m
//  Fragrance
//
//  Created by yinzhongyuan on 15/5/25.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "FDJieXi.h"

@implementation FDJieXi

+(NSMutableArray *)getDetailsModel:(NSData *)data

{
    
    NSMutableArray *arr = [NSMutableArray array];
    NSError *error = nil;
    NSDictionary *dic =[NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:&error];
    NSArray *array = [dic objectForKey:@"list"];
    for (NSDictionary *dic1 in array) {
        FirstDetailsModel *model = [FirstDetailsModel getDetailsModel];
        model.pic = [dic1 objectForKey:@"cover"];
        model.name = [dic1 objectForKey:@"title"];
        model.need = [dic1 objectForKey:@"message"];
        model.Id = [dic1 objectForKey:@"id"];
        model.idx = [[dic1 objectForKey:@"idx"]integerValue];
        model.saveNumber = [[dic1 objectForKey:@"favnum"]integerValue];
        [arr addObject:model];
    }
    
    return arr;
    
}






@end
